package com.bgs.service;

import com.bgs.mapper.LoginMapper;
import com.bgs.pojo.EmployeeVo;
import com.bgs.pojo.UserTokenVo;
import com.bgs.tool.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService{

    @Autowired
    private LoginMapper loginMapper;

    @Override
    public UserTokenVo getLoginUser(String phone, String userpassword) {
        return loginMapper.getLoinUser(phone,userpassword);
    }

    @Override
    public boolean register(EmployeeVo employeeVo) {
        boolean b = loginMapper.register(employeeVo);
        return b;
    }

    @Override
    public Boolean password(String userpassword, Integer eid) {
        int i=loginMapper.password(userpassword,eid);
        if(i>0){
            return true;
        }
        return false;
    }

//    @Override
//    public List register(EmployeeVo employeeVo) {
//        return loginMapper.register(employeeVo);
//    }
}
